3.6 \(\int \frac{(a+b x^2) (c+d x^2)}{(e+f x^2)^2} \, dx\)

Optimal. Leaf size=108 \[ -\frac{\tan ^{-1}\left (\frac{\sqrt{f} x}{\sqrt{e}}\right ) (b e (3 d e-c f)-a f (c f+d e))}{2 e^{3/2} f^{5/2}}-\frac{x \left (a+b x^2\right ) (d e-c f)}{2 e f \left (e+f x^2\right )}+\frac{b x (3 d e-c f)}{2 e f^2} \]

[Out]

(b*(3*d*e - c*f)*x)/(2*e*f^2) - ((d*e - c*f)*x*(a + b*x^2))/(2*e*f*(e + f*x^2)) - ((b*e*(3*d*e - c*f) - a*f*(d
*e + c*f))*ArcTan[(Sqrt[f]*x)/Sqrt[e]])/(2*e^(3/2)*f^(5/2))

________________________________________________________________________________________

Rubi [A]  time = 0.0849137, antiderivative size = 108, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 24, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.125, Rules used = {526, 388, 205} \[ -\frac{\tan ^{-1}\left (\frac{\sqrt{f} x}{\sqrt{e}}\right ) (b e (3 d e-c f)-a f (c f+d e))}{2 e^{3/2} f^{5/2}}-\frac{x \left (a+b x^2\right ) (d e-c f)}{2 e f \left (e+f x^2\right )}+\frac{b x (3 d e-c f)}{2 e f^2} \]

Antiderivative was successfully verified.

[In]

Int[((a + b*x^2)*(c + d*x^2))/(e + f*x^2)^2,x]

[Out]

(b*(3*d*e - c*f)*x)/(2*e*f^2) - ((d*e - c*f)*x*(a + b*x^2))/(2*e*f*(e + f*x^2)) - ((b*e*(3*d*e - c*f) - a*f*(d
*e + c*f))*ArcTan[(Sqrt[f]*x)/Sqrt[e]])/(2*e^(3/2)*f^(5/2))

Rule 526

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_.)*((e_) + (f_.)*(x_)^(n_)), x_Symbol] :> -Simp[
((b*e - a*f)*x*(a + b*x^n)^(p + 1)*(c + d*x^n)^q)/(a*b*n*(p + 1)), x] + Dist[1/(a*b*n*(p + 1)), Int[(a + b*x^n
)^(p + 1)*(c + d*x^n)^(q - 1)*Simp[c*(b*e*n*(p + 1) + b*e - a*f) + d*(b*e*n*(p + 1) + (b*e - a*f)*(n*q + 1))*x
^n, x], x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && LtQ[p, -1] && GtQ[q, 0]

Rule 388

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Simp[(d*x*(a + b*x^n)^(p + 1))/(b*(n*
(p + 1) + 1)), x] - Dist[(a*d - b*c*(n*(p + 1) + 1))/(b*(n*(p + 1) + 1)), Int[(a + b*x^n)^p, x], x] /; FreeQ[{
a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && NeQ[n*(p + 1) + 1, 0]

Rule 205

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]*ArcTan[x/Rt[a/b, 2]])/a, x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rubi steps

\begin{align*} \int \frac{\left (a+b x^2\right ) \left (c+d x^2\right )}{\left (e+f x^2\right )^2} \, dx &=-\frac{(d e-c f) x \left (a+b x^2\right )}{2 e f \left (e+f x^2\right )}-\frac{\int \frac{-a (d e+c f)-b (3 d e-c f) x^2}{e+f x^2} \, dx}{2 e f}\\ &=\frac{b (3 d e-c f) x}{2 e f^2}-\frac{(d e-c f) x \left (a+b x^2\right )}{2 e f \left (e+f x^2\right )}-\frac{(b e (3 d e-c f)-a f (d e+c f)) \int \frac{1}{e+f x^2} \, dx}{2 e f^2}\\ &=\frac{b (3 d e-c f) x}{2 e f^2}-\frac{(d e-c f) x \left (a+b x^2\right )}{2 e f \left (e+f x^2\right )}-\frac{(b e (3 d e-c f)-a f (d e+c f)) \tan ^{-1}\left (\frac{\sqrt{f} x}{\sqrt{e}}\right )}{2 e^{3/2} f^{5/2}}\\ \end{align*}

Mathematica [A]  time = 0.0666011, size = 95, normalized size = 0.88 \[ -\frac{\tan ^{-1}\left (\frac{\sqrt{f} x}{\sqrt{e}}\right ) (b e (3 d e-c f)-a f (c f+d e))}{2 e^{3/2} f^{5/2}}+\frac{x (b e-a f) (d e-c f)}{2 e f^2 \left (e+f x^2\right )}+\frac{b d x}{f^2} \]

Antiderivative was successfully verified.

[In]

Integrate[((a + b*x^2)*(c + d*x^2))/(e + f*x^2)^2,x]

[Out]

(b*d*x)/f^2 + ((b*e - a*f)*(d*e - c*f)*x)/(2*e*f^2*(e + f*x^2)) - ((b*e*(3*d*e - c*f) - a*f*(d*e + c*f))*ArcTa
n[(Sqrt[f]*x)/Sqrt[e]])/(2*e^(3/2)*f^(5/2))

________________________________________________________________________________________

Maple [A]  time = 0.008, size = 163, normalized size = 1.5 \begin{align*}{\frac{bdx}{{f}^{2}}}+{\frac{axc}{2\,e \left ( f{x}^{2}+e \right ) }}-{\frac{axd}{2\,f \left ( f{x}^{2}+e \right ) }}-{\frac{bcx}{2\,f \left ( f{x}^{2}+e \right ) }}+{\frac{bxed}{2\,{f}^{2} \left ( f{x}^{2}+e \right ) }}+{\frac{ac}{2\,e}\arctan \left ({fx{\frac{1}{\sqrt{ef}}}} \right ){\frac{1}{\sqrt{ef}}}}+{\frac{ad}{2\,f}\arctan \left ({fx{\frac{1}{\sqrt{ef}}}} \right ){\frac{1}{\sqrt{ef}}}}+{\frac{bc}{2\,f}\arctan \left ({fx{\frac{1}{\sqrt{ef}}}} \right ){\frac{1}{\sqrt{ef}}}}-{\frac{3\,bde}{2\,{f}^{2}}\arctan \left ({fx{\frac{1}{\sqrt{ef}}}} \right ){\frac{1}{\sqrt{ef}}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((b*x^2+a)*(d*x^2+c)/(f*x^2+e)^2,x)

[Out]

b*d/f^2*x+1/2/e*x/(f*x^2+e)*a*c-1/2/f*x/(f*x^2+e)*a*d-1/2/f*x/(f*x^2+e)*b*c+1/2/f^2*e*x/(f*x^2+e)*b*d+1/2/e/(e
*f)^(1/2)*arctan(x*f/(e*f)^(1/2))*a*c+1/2/f/(e*f)^(1/2)*arctan(x*f/(e*f)^(1/2))*a*d+1/2/f/(e*f)^(1/2)*arctan(x
*f/(e*f)^(1/2))*b*c-3/2/f^2*e/(e*f)^(1/2)*arctan(x*f/(e*f)^(1/2))*b*d

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x^2+a)*(d*x^2+c)/(f*x^2+e)^2,x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [A]  time = 1.46482, size = 660, normalized size = 6.11 \begin{align*} \left [\frac{4 \, b d e^{2} f^{2} x^{3} +{\left (3 \, b d e^{3} - a c e f^{2} -{\left (b c + a d\right )} e^{2} f +{\left (3 \, b d e^{2} f - a c f^{3} -{\left (b c + a d\right )} e f^{2}\right )} x^{2}\right )} \sqrt{-e f} \log \left (\frac{f x^{2} - 2 \, \sqrt{-e f} x - e}{f x^{2} + e}\right ) + 2 \,{\left (3 \, b d e^{3} f + a c e f^{3} -{\left (b c + a d\right )} e^{2} f^{2}\right )} x}{4 \,{\left (e^{2} f^{4} x^{2} + e^{3} f^{3}\right )}}, \frac{2 \, b d e^{2} f^{2} x^{3} -{\left (3 \, b d e^{3} - a c e f^{2} -{\left (b c + a d\right )} e^{2} f +{\left (3 \, b d e^{2} f - a c f^{3} -{\left (b c + a d\right )} e f^{2}\right )} x^{2}\right )} \sqrt{e f} \arctan \left (\frac{\sqrt{e f} x}{e}\right ) +{\left (3 \, b d e^{3} f + a c e f^{3} -{\left (b c + a d\right )} e^{2} f^{2}\right )} x}{2 \,{\left (e^{2} f^{4} x^{2} + e^{3} f^{3}\right )}}\right ] \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x^2+a)*(d*x^2+c)/(f*x^2+e)^2,x, algorithm="fricas")

[Out]

[1/4*(4*b*d*e^2*f^2*x^3 + (3*b*d*e^3 - a*c*e*f^2 - (b*c + a*d)*e^2*f + (3*b*d*e^2*f - a*c*f^3 - (b*c + a*d)*e*
f^2)*x^2)*sqrt(-e*f)*log((f*x^2 - 2*sqrt(-e*f)*x - e)/(f*x^2 + e)) + 2*(3*b*d*e^3*f + a*c*e*f^3 - (b*c + a*d)*
e^2*f^2)*x)/(e^2*f^4*x^2 + e^3*f^3), 1/2*(2*b*d*e^2*f^2*x^3 - (3*b*d*e^3 - a*c*e*f^2 - (b*c + a*d)*e^2*f + (3*
b*d*e^2*f - a*c*f^3 - (b*c + a*d)*e*f^2)*x^2)*sqrt(e*f)*arctan(sqrt(e*f)*x/e) + (3*b*d*e^3*f + a*c*e*f^3 - (b*
c + a*d)*e^2*f^2)*x)/(e^2*f^4*x^2 + e^3*f^3)]

________________________________________________________________________________________

Sympy [A]  time = 1.58296, size = 190, normalized size = 1.76 \begin{align*} \frac{b d x}{f^{2}} + \frac{x \left (a c f^{2} - a d e f - b c e f + b d e^{2}\right )}{2 e^{2} f^{2} + 2 e f^{3} x^{2}} - \frac{\sqrt{- \frac{1}{e^{3} f^{5}}} \left (a c f^{2} + a d e f + b c e f - 3 b d e^{2}\right ) \log{\left (- e^{2} f^{2} \sqrt{- \frac{1}{e^{3} f^{5}}} + x \right )}}{4} + \frac{\sqrt{- \frac{1}{e^{3} f^{5}}} \left (a c f^{2} + a d e f + b c e f - 3 b d e^{2}\right ) \log{\left (e^{2} f^{2} \sqrt{- \frac{1}{e^{3} f^{5}}} + x \right )}}{4} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x**2+a)*(d*x**2+c)/(f*x**2+e)**2,x)

[Out]

b*d*x/f**2 + x*(a*c*f**2 - a*d*e*f - b*c*e*f + b*d*e**2)/(2*e**2*f**2 + 2*e*f**3*x**2) - sqrt(-1/(e**3*f**5))*
(a*c*f**2 + a*d*e*f + b*c*e*f - 3*b*d*e**2)*log(-e**2*f**2*sqrt(-1/(e**3*f**5)) + x)/4 + sqrt(-1/(e**3*f**5))*
(a*c*f**2 + a*d*e*f + b*c*e*f - 3*b*d*e**2)*log(e**2*f**2*sqrt(-1/(e**3*f**5)) + x)/4

________________________________________________________________________________________

Giac [A]  time = 1.14734, size = 128, normalized size = 1.19 \begin{align*} \frac{b d x}{f^{2}} + \frac{{\left (a c f^{2} + b c f e + a d f e - 3 \, b d e^{2}\right )} \arctan \left (\sqrt{f} x e^{\left (-\frac{1}{2}\right )}\right ) e^{\left (-\frac{3}{2}\right )}}{2 \, f^{\frac{5}{2}}} + \frac{{\left (a c f^{2} x - b c f x e - a d f x e + b d x e^{2}\right )} e^{\left (-1\right )}}{2 \,{\left (f x^{2} + e\right )} f^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x^2+a)*(d*x^2+c)/(f*x^2+e)^2,x, algorithm="giac")

[Out]

b*d*x/f^2 + 1/2*(a*c*f^2 + b*c*f*e + a*d*f*e - 3*b*d*e^2)*arctan(sqrt(f)*x*e^(-1/2))*e^(-3/2)/f^(5/2) + 1/2*(a
*c*f^2*x - b*c*f*x*e - a*d*f*x*e + b*d*x*e^2)*e^(-1)/((f*x^2 + e)*f^2)